<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>青苜绩效</title>
	<meta name="csrf-token" content="{{ csrf_token() }}">
    <link href="{{ asset('/addons/flatui/css/flat-ui.css') }}" rel="stylesheet">
	<link href="{{ asset('/addons/bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
	<link href="{{ asset('/addons/bootstrap-dialog/css/bootstrap-dialog.min.css') }}" rel="stylesheet" type="text/css" />
    <link href="{{ asset('/css/dashboard.css') }}" rel="stylesheet">
    <link href="{{ asset('/css/font-awesome.min.css') }}" rel="stylesheet">
	<link href="{{ asset('/addons/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css') }}" rel="stylesheet">
    <link href="{{ asset('/js/Font-Awesome-3.2.1/css/font-awesome.min.css') }}" rel="stylesheet" type="text/css">
    <link href="{{ asset('/addons/icheck-1.x/skins/flat/blue.css') }}" rel="stylesheet">
	<link href="{{ asset('/addons/icheck-1.x/skins/square/green.css') }}" rel="stylesheet">
	<link href="{{ asset('/css/admin.css') }}" rel="stylesheet">
    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]><script src="{{ asset('/js/ie8-responsive-file-warning.js') }}"></script><![endif]-->
    <script src="{{ asset('/js/ie-emulation-modes-warning.js') }}"></script>

	<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
	<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
	<!--[if lt IE 9]>
		<script src="{{ asset('/js/html5shiv.min.js') }}"></script>
		<script src="{{ asset('/js/respond.min.js') }}"></script>
	<![endif]-->
	<!-- Scripts -->
	<script src="{{ asset('/js/jquery.min.js') }}"></script>
	<script src="{{ asset('/js/lib/jquery-ui.min.js')}}"></script>
	<script src="{{ asset('/addons/flatui/js/flat-ui.min.js') }}"></script>
    <script src="{{ asset('/addons/layer/layer.js')}}"></script>
<!-- 	<script src="{{ asset('/bootstrap/js/bootstrap.min.js') }}"></script> -->
	<script src="{{ asset('/addons/bootstrap-dialog/js/bootstrap-dialog.min.js') }}"></script>
    <script src="{{ asset('/addons/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js') }}" type="text/javascript"></script>
    <script src="{{ asset('/addons/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.fr.js') }}" type="text/javascript"></script>
	<script src="{{ asset('/addons/icheck-1.x/icheck.min.js') }}" type="text/javascript"></script>
	<script src="{{ asset('/js/underscore-min.js') }}"></script>
	<script src="{{ asset('/js/admin.js') }}"></script>
	<!-- uploadify 上传组件 -->
    <link rel="stylesheet" type="text/css" href="{{ asset('/js/uploadify/uploadify.css') }}">
	<script src="{{ asset('/js/uploadify/jquery.uploadify.min.js') }}"></script>

	<script src="{{ asset('/js/posfixed.js') }}"></script>
   
</head>
<body>
	@if (!Auth::guest())
    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">青苜绩效后台管理系统</a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
				<ul class="nav navbar-nav">
				    @foreach($site_menu as $menu)
					<li @if(strpos($request_uri,$menu->url) !== false ) class="active" @endif>
					   <a href="{{ url($menu->url) }}" >{{ $menu->name }}</a>
					</li>
					@endforeach
				</ul>

				<ul class="nav navbar-nav navbar-right">
					@if (Auth::guest())
						<li><a href="{{ url('/auth/login') }}">Login</a></li>
						<li><a href="{{ url('/auth/register') }}">Register</a></li>
					@else
						<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">{{ Auth::user()->name }} <span class="caret"></span></a>
							<ul class="dropdown-menu" role="menu">
							    <li><a href="{{ url('/admin/index/owner') }}">个人资料</a></li>
								<li><a href="{{ url('/auth/logout') }}">Logout</a></li>
							</ul>
						</li>
					@endif
				</ul>
		</div>
      </div>
    </nav>
	<div class="container-fluid">
	   <div class="row">
        <div class="col-xs-12 col-sm-3 col-lg-2 big-menu mt20">
			@foreach($child_menu[$menu_keys] as $k=>$chmenu)
			<div class="panel panel-default" @if($k == 0) style="border-top:1px #ddd solid;" @endif>
				<div class="panel-heading">
					<h4 class="panel-title">{{ $chmenu->name }}</h4>
					<a class="panel-collapse collapsed" data-toggle="collapse" href="#frame-{{$k}}">
						<i class="fa fa-chevron-circle-down" style="line-height: 38px"></i>
					</a>
				</div>
				<ul class="list-group collapse in" id="frame-{{$k}}">
					@foreach($chmenu[$chmenu->description] as $childrens)
					<li class="list-group-item @if(str_contains($request_uri,$childrens->url)) active @endif" onclick="window.location.href = '{{ $childrens->url }}';" style="cursor:pointer;" kw="{{ $childrens->name}}">
						{{ $childrens->name}}
					</li>
					@endforeach
				</ul>
			</div>
			@endforeach
	    </div>
        <div class="col-xs-12 col-sm-9 col-lg-10 main">
          @yield('content')
        </div>
	   </div>
	</div>

	@else
	    @yield('content')
	 @endif

	<link href="{{ asset('/addons/bootstrap/css/bootstrap.min.css') }}" rel="stylesheet" />
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="{{ asset('/js/ie10-viewport-bug-workaround.js') }}"></script>
</body>
</html>
